package com.chuantou.yuba.api.to;

import java.util.List;

import com.chuantou.yuba.util.Constants;
import com.google.gson.annotations.SerializedName;

/**
 * 动态列表TO
 * 
 * @author dl1001
 * 
 */
public class TrendsDataTO extends BaseTO {
	@SerializedName("data")
	private TrendsListTO trends;

	@Override
	public int getCurrentPage() {
		return trends == null ? 1 : trends.getCurrentPage();
	}

	public TrendsListTO getTrends() {
		return trends;
	}

	public void setTrends(TrendsListTO trends) {
		this.trends = trends;
	}

	public List<TrendsTO> getTrendsList() {
		return trends == null ? null : trends.getTrendsList();
	}

	@Override
	public boolean hasNextPage() {
		return trends != null && trends.getTrendsList() != null && trends.getTrendsList().size() >= Constants.DEFAULT_PAGE_SIZE;
	}
}
